
<%@page import="com.core.utils.LocalizableString"%>
<%@page import="com.core.managers.LoginManager"%>
<%
	LoginManager loginManager = LoginManager.sharedInstance();
    loginManager.incrementLoginformOpenAttepts();

    LocalizableString localizableString = LocalizableString.sharedInstance();

    loginManager.setLoginFormDisplaying(true);
    String warningText = "";
    if ( loginManager.getLoginAttemptsCount() > 0 ) {
        warningText = localizableString.localizable("form.login.message.wrongpassword");
        loginManager.resetLoginformOpenAttepts();
    }

    String caption = localizableString.localizable("form.login.caption");
    String fieldName_name = localizableString.localizable("form.login.fieldname.name");
    String fieldName_pass = localizableString.localizable("form.login.fieldname.password");
    String checkbox_remember = localizableString.localizable("form.login.checkbox.rememberMe");
    String link_recover = localizableString.localizable("form.login.recoverlink");

%>




<div class="loginForm_bordered">
    <div class="loginForm_header"><%=caption %></div>
    <div class="loginForm_table">
        <form method="POST" action="Login">
            <div class="loginForm_table_cell">
                <div class="loginForm_table_caption"><%=fieldName_name%></div>
                <div class="loginForm_table_value">
                    <input type="text" size="25" name="userName">
                </div>
            </div>
            <div class="loginForm_table_cell">
                <div class="loginForm_table_caption"><%=fieldName_pass%></div>
                <div class="loginForm_table_value">
                    <input type="password" size="25" name="userPassword">
                </div>
            </div>
            <div class="loginForm_table_cell">
                <div class="loginForm_table_caption"><%=checkbox_remember%></div>
                <div class="loginForm_table_value">
                    <input type="checkbox" size="25" name="userRemember">
                </div>
            </div>
            <div class="loginForm_table_cell">
                <div class="loginForm_table_separator" style="text-align: center;">
                    <input type="submit" size="25" value="Enter">
                </div>
            </div>
            <div class="loginForm_table_cell">
                <div class="loginForm_table_separator">
                    <a href="recover"><%=link_recover%></a>
                </div>
            </div>
            <div class="loginForm_table_cell">
                <div class="loginForm_table_separator">
                    <br>
                    <font color="red"> <%=warningText%></font> <br>
                </div>
            </div>
        </form>
    </div>


</div>